{% extends 'base.html' %}
{% block app_content %}
    <table width="100%  " height="288" border="0" align="center"
           cellpadding="0"
           cellspacing="0" bgcolor="#FFFFFF">
        <tr>
            <td align="center" valign="top">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="10" colspan="4">&nbsp;<hr
                                style=" height:1px;border:none;border-top:1px dotted #185598;"/>
                        </td>
                    </tr>
                    <tr>
                        <td height="30" align="right">&nbsp;</td>
                        <td width="10"
                            background="{{ url_for('static',filename='admin/images/manage_leftTitle_left.GIF') }}">&nbsp;
                        </td>
                        <td width="1070" align="center"
                            background="{{ url_for('static',filename='admin/images/manage_leftTitle_mid.GIF') }}"
                            class="word_white"><b>日志列表</b></td>
                        <td width="10"
                            background="{{ url_for('static',filename='admin/images/manage_leftTitle_right.GIF') }}">
                        </td>
                        <td>&nbsp;</td>
                    </tr>
                    <table style="font-size:15px;" width="95%" height="30"
                           border="0" cellpadding="0"
                           cellspacing="0">
                        <tr>
                            <td valign="top">
                                <table
                                        width="100%" height="30" border="1"
                                        cellpadding="0" cellspacing="0"
                                        bordercolor="#FFFFFF"
                                        bordercolordark="#FFFFFF"
                                        bordercolorlight="#E6E6E6">
                                    <tr bgcolor="#eeeeee">
                                        <td width="32%" align="center">日志
                                        </td>
                                        <td width="32%" align="center">上传时间
                                        </td>
                                        <td width="15%" align="center">删除</td>
                                    </tr>
                                    {% for job in page_data.items %}
                                        <tr style="padding:5px;">
                                            <td align="left">
                                                <a href="/hardware/{{ manu_name }}/{{ hardware_name }}/{{ job.task_id }}/{{ job.job_name }}">{{ job.job_name }}</a>
                                            </td>
                                            <td align="center">{{ job.upload_time }}</td>
                                            <td align="center">
                                                <a onclick="return window.confirm('您想删除吗?');" href="/hardware/del/{{ job.hardware_id}}/{{ job.task_id }}/{{ job.job_name }}"><img src="/static/admin/images/del.gif" width="20" height="20"></a>
                                            </td>
                                        </tr>
                                    {% endfor %}
                                </table>
                                {% if page_data %}
                                    <tbody>
                                    <tr>
                                        <td height="30" align="right">
                                            当前页数：[{{ page_data.page }}/{{ page_data.pages }}]&nbsp;
                                            <a href="{{ url_for('home.get_job',hardware_name=hardware_name, task_id=task_id, page=1) }}">第一页</a>
                                            {% if page_data.has_prev %}
                                                <a href="{{ url_for('home.get_job',hardware_name=hardware_name, task_id=task_id, page=page_data.page-1) }}">上一页</a>
                                            {% endif %}
                                            {% if page_data.has_next %} 　
                                                <a href="{{ url_for('home.get_job',hardware_name=hardware_name, task_id=task_id, page=page_data.page+1) }}">下一页</a>
                                            {% endif %}　
                                                <a href="{{ url_for('home.get_job',hardware_name=hardware_name, task_id=task_id, page=page_data.pages) }}">最后一页&nbsp;</a>
                                        </td>
                                    </tr>
                                    </tbody>
                                {% endif %}
                            </td>
                        </tr>
                    </table>
                    </td>
                </table>
            </td>
        </tr>
    </table>
{% endblock %}
